package com.todo.partner.iface.frontend.request;

import com.todo.common.common.entity.CurrentUser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author azhebuxing
 * @date 2024/6/4 13:51
 * @description
 */
@Data
@Schema(name = "更新搭子内容入参", description = "更新搭子内容入参")
public class UpdateContentPartnerByIdParam {

    private CurrentUser _user;


    @Schema(name = "主键id", description = "主键id")
    private String partnerId;

    @Schema(name = "内容id", description = "内容id")
    private String contentId;

    @Schema(name = "内容标题", description = "内容标题")
    private String title;

    @Schema(name = "内容信息", description = "内容信息")
    private String content;

    @Schema(name = "主图", description = "主图")
    private String mainImg;

    @Schema(name = "是否私有", description = "是否私有")
    private Integer isPrivate;

    @Schema(name = "是否允许评论", description = "是否允许评论")
    private Integer allowComment;

    @Schema(name = "搭子内容类型", description = "搭子内容类型")
    private Integer partnerContentType;

    @Schema(name = "关联类型", description = "关联类型：景点、饭店、攻略等")
    private Integer relationType;

    @Schema(name = "关联主键", description = "关联主键")
    private Long relationId;

    @Schema(name = "省份", description = "省份")
    private String province;

    @Schema(name = "城市", description = "城市")
    private String city;

    @Schema(name = "开始时间", description = "开始时间")
    private Date startPlanTime;

    @Schema(name = "结束时间", description = "结束时间")
    private Date endPlanTime;

    @Schema(name = "预计花销", description = "预计花销")
    private BigDecimal expectCost;

    @Schema(name = "预计人数", description = "预计人数")
    private Integer expectPeopleCount;

    public boolean baseCheck() {
        if (partnerId == null || contentId == null || title == null || content == null || mainImg == null || isPrivate == null || allowComment == null || partnerContentType == null || province == null || city == null || startPlanTime == null || endPlanTime == null) {
            return false;
        }
        return true;
    }
}
